def calculate(amount, rate, time):
    amount = amount + amount * rate
    print('year {} : {}'.format(time, amount))
    return amount


time = 1
amount = 100
rate = 0.05
while time <= 10:
    amount = calculate(amount, rate, time)
    time = time + 1
